<template>
    <div class="flood">
        <div class="flood-content">
            <div class="flood-content-picture">
                <img :src="require('@/assets/images/flood-weather.jpg')" alt="" width="100%" height="100%">
            </div>
            <div class="flood-content-news">
                <h3>Flash Floods in Singapore on 08th January 2018</h3>
                <p>Flash Floods in Singapore on 08th January 2018 after a heavy downpour over many parts of Singapore. Majority
                    of the flash floods happened in the Western part of Singapore. The water subsided by 10.30am.</p>
            </div>
        </div>
    </div>
</template>

<script>
    import { SetCameraInfo } from '@/util/poi'
    export default {
        name: 'FLOOD',
        props: [''],
        data() {
            return {

            };
        },

        components: {},

        computed: {},

        mounted() {
            this.setCameraFocus();
            setTimeout(() => {
                this.init();
            }, 3000)
        },

        beforeDestroy() {
            //清除洪水
            let jsondata = {
                ActorName: 'Flood_BP',
                FunctionName: 'clearFloodState'
            };
            window.cloudRender.SuperAPI("specialChannel", jsondata);
        },

        methods: {
            setCameraFocus() {
                let removeJsondata = {
                    "covering_type": "poi" //覆盖物类型, 详见下表
                }
                window.cloudRender.SuperAPI("RemoveAllCovering", removeJsondata);
                let jsondata = SetCameraInfo("103.74894,1.362103", 2000, 80)
                window.cloudRender.SuperAPI("SetCameraInfo", jsondata)
            },
            init() {
                let jsondata = {
                    ActorName: 'Flood_BP',
                    FunctionName: 'getFloodState'

                };
                window.cloudRender.SuperAPI("specialChannel", jsondata);
            }
        },

        watch: {},


    }
</script>
<style lang='' scoped>

</style>